package com.ddx.common.enums;

/**
 *  审核状态枚举类
 */

public enum UserAuditStatus {

    TO_AUDIT(0, "待审核"),
    AUDITED(1,"已认证"),
    UN_AUDITED(2, "未认证"),
    AUDITED_FAILD(3,"认证失败");

    private Integer code;
    private String msg;

    UserAuditStatus(Integer code, String msg) {
        this.code=code;
        this.msg=msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public static UserAuditStatus getUserAuditStatus(Integer code) {
        for (UserAuditStatus t : UserAuditStatus.values()) {
            if (code.equals(t.getCode())) {
                return t;
            }
        }
        return null;
    }
}
